package jlts.front.core;

import jlts.front.core.UiController;
import jlts.front.ui.ExamFrame;
import jlts.front.ui.LoginFrame;
import jlts.front.ui.MenuFrame;

/**
 * @ClassName ClientMain
 * @Description TODO
 * @Author Zxeao
 * @Date 2021/12/21 下午1:50
 * @Version V1.0
 */
public class ClientMain {
    public static void main(String[] args) {
        //创建窗口对象
        LoginFrame loginFrame=new LoginFrame();
        MenuFrame menuFrame=new MenuFrame();
        ExamFrame examFrame =new ExamFrame ();
        //创建控制器对象
        UiController uiController=new UiController();
        //创建客户端连接服务器的对象
        Client client=new Client();
        //给控制器注入client对象
        uiController.setClient(client);
        //给控制器注入窗口
        uiController.setLoginFrame(loginFrame);
        uiController.setMenuFrame(menuFrame);
        uiController.setExamFrame(examFrame);
        //给窗口注入控制器
        loginFrame.setUiController(uiController);
    }
}
